#ifndef __CLASS_MATRIX_H
#define __CLASS_MATRIX_H
#include "head.h"
class matrix_
{
	public:
   int no_pool; //This is a special used sign. It means that the pool number that matrix is stored

   int rows;      //The number of rows of the matrix.
   int columns;    //the number of columns of this matrix.
   COMPLEX *array;   //the array used to store the complex entries of the matrix.
   
     
   matrix_()
	{
		rows=0;
   	columns=0;
   	array=NULL;
	};
   matrix_(int row,int column);
   matrix_ operator=(const COMPLEX &a);
   friend matrix_ H(const matrix_ &m);
   friend matrix_ T(const matrix_ &m);
   matrix_ slice(int row1,int col1,int row2,int col2);
   friend matrix_ slice(const matrix_ &m1,int row1,int col1,int row2,int col2);
   
   friend matrix_ operator*(COMPLEX x,const matrix_ &m1);
   matrix_ invert(float Er);
   friend matrix_ compose(matrix_ &m1,matrix_ &m2,int select);
   friend matrix_ operator-(matrix_ &m);
   friend matrix_ operator+(matrix_ &m);
   friend void conjugate(matrix_ &m);
   matrix_  compose(matrix_ &m2,int select);
   operator COMPLEX *();
   matrix_ multi(const matrix_ &a);
   friend float abs_matrix(matrix_ &m);
   void conjugate();
   void output();
   ~matrix_()
   {
   	
      //delete array;
   }
};

#endif